home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_12_05 / plauger / ioassign.c < prev    next >
C/C++ Source or Header  |  1994-03-08  |  404b  |  19 lines

  1.  
  2. --------------- Listing 7: The ios assignment operator ------------
  3.  
  4. // iosassign -- ios::operator=(const ios&)
  5. #include <ios>
  6.  
  7. ios& ios::operator=(const ios& rhs)
  8.     {    // assign to an ios
  9.     if (this != &rhs)
  10.         {    // safe to copy
  11.         _Sb = rhs._Sb;
  12.         _State = rhs._State;
  13.         copyfmt(rhs);    // cause any throw at end
  14.         }
  15.     return (*this);
  16.     }
  17.  
  18.  
  19.